const { exec } = require('../db/mysql');

// 验证登录
const login = (username='', password='') => {
  const sql = `SELECT username,password,realname FROM users WHERE username='${username}' AND password='${password}';`
  return exec(sql).then(userData => {
    return userData
  })
}

module.exports = {
  login
}